package com.woniuxy.mesboot.service.impl;

import com.woniuxy.mesboot.dto.UserDTO;
import com.woniuxy.mesboot.entity.SysUser;
import com.woniuxy.mesboot.mapper.SysUserMapper;
import com.woniuxy.mesboot.service.UserService;
import com.woniuxy.mesboot.vo.UserVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ：lisir
 * @date ：Created in 2023/5/23 16:49
 * @description：TODO
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private SysUserMapper userMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public SysUser selectByUsername(String username) {
        return userMapper.selectByUsername(username);
    }

    @Override
    public List<UserVO> selectAll(UserDTO user) {
        return userMapper.selectAll(user);
    }

    @Override
    public UserVO selectByNameAndPwd(UserDTO user) {
        return userMapper.selectByNameAndPwd(user);
    }

    @Override
    public int insert(SysUser record) {
        return 0;
    }

    @Override
    public int insertSelective(SysUser record) {
        return userMapper.insertSelective(record);
    }

    @Override
    public SysUser selectByPrimaryKey(Long id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public UserVO selectByName(String userName) {
        return userMapper.selectByName(userName);
    }

    @Override
    public String selectPwdById(Long id) {
        return userMapper.selectPwdById(id);
    }

    @Override
    public int updateByPrimaryKeySelective(SysUser record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return 0;
    }
}
